﻿@{
    Layout = null;
}

<html class="x-admin-sm">
<head>
    <meta name="viewport" content="width=device-width" />
    <meta charset="UTF-8">
    <title>实盘清单</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link href="~/X-admin/css/font.css" rel="stylesheet" />
    <script src="~/X-admin/lib/layui/layui.js"></script>
    <link href="~/X-admin/css/xadmin.css" rel="stylesheet" />
    <script src="~/X-admin/js/jquery.min.js"></script>
    <script src="~/X-admin/js/xadmin.js"></script>
    <script src="~/js/framework/sysframework.js"></script>
    <script src="~/js/framework/commonjs.js"></script>
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-card-body ">
                <form class="layui-form layui-col-space5" name="qForm" id="qForm">
                    <div class="layui-inline layui-show-xs-block">
                        <input type="text" name="barCode" placeholder="条码编码" autocomplete="off" class="layui-input" id="barCode">
                    </div>

                    <div class="layui-inline layui-show-xs-block">
                        <button class="layui-btn" lay-filter="sreach" id="userSearch" type="button" onclick="loadData()"><i class="layui-icon">&#xe615;</i></button>

                    </div>
                    <input type="hidden" name="pchCode" id="pchCode">
                </form>
            </div>

            <div class="layui-card-body layui-table-body layui-table-main">
                <table class="layui-hide" id="list" lay-filter="list"></table>

            </div>
        </div>
    </div>
</body>
</html>
<script type="text/javascript">
    $(function () {
        $("input[ name='pchCode']").val(getUrlVariable("pchCode"));
        loadData();
    });
    function loadData() {
        var conditon = JSON.stringify(FormToJson("qForm"));
        layui.use('table', function () {
            var table = layui.table;
            table.render({
                elem: '#list'
                , height: 'full-200'   //固定高度-即固定表头固定第一行首行
            , url: "../ProCheck/GetDataList?condition=" + conditon + "&dataType=chRds"
            , skin: 'row' //表格风格
            , even: true
                , page: true //是否显示分页
                , limits: [50, 100, 150]
                , limit: 50 //每页默认显示的数量
            , cols: [[ //标题栏
                { field: 'barCode', align: 'center', title: '条码编码', width: 120 }
                , { field: 'proCode', align: 'center', title: '存货编码', width: 110 }
                    , { field: 'proName', align: 'center', title: '存货名称', width: 130 }
                    , { field: 'spec', align: 'center', title: '规 格', width: 110 }
                , { field: 'number', align: 'center', title: '数量', width: 110 }
                , { field: 'proWeight', align: 'center', title: '重量', width: 110 }
                , { field: 'proMeter', align: 'center', title: '长度', width: 110 }
                    , { field: 'userName', align: 'center', title: '盘点人', width: 110 } //空列
                    , { field: 'createtime', align: 'center', title: '扫码时间', width: 150 } //空列
            ]]

            });
        });
    }

</script>
